<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/images/module.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/images/css.css"/>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/showdate.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/webox/js/jquery-webox.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/webox/image/jquery-webox.css"/>
<title>网站资源列表-<{$U.username}> 的外链管理</title>
<script>
    function add(){
        $.webox({
            height:300,
            width:610,
            bgvisibel:true,
            title:'添加网站',
            iframe:"<{:U('source/add')}>"
        });
    }
    function del(sid){
        $.get("<{:U('source/del')}>",{"sid":sid},function(msg){
            if(!msg.status || msg.status!="1"){
                alert('删除失败');
            }else{
                window.location.reload();
            }
        })
    }
    function edit(sid){
        if(isNaN(sid)){
            return false;
        }
        $.webox({
            height:300,
            width:610,
            bgvisibel:true,
            title:'编辑网站',
            iframe:"<{:U('source/edit',array('sid'=>'"+sid+"'))}>"
        });
        
    }
    
</script>
</head>
<body>
<!--top-->
<div class='header' id='header'>
<div id='header_relative'>
<div><a class='headerlogo' href="<{:U('Index/index')}>"></a></div>
<div class='msglogin'>
亲爱的 [<a href='#'><{$U.username}></a>] 今天<{$Think.now}>&nbsp;&nbsp;&nbsp;
[<a href='javascript:void(0)' target='_blank'>帮助</a>]
[<a href="<{:U('Plus/logout')}>">退出</a>]
</div>
<div class='serviceset'>
</div>
<ul class='menu'>
 <li><a href='<{:U('Index/index')}>'  >系统管理</a></li>
 <li><a href='<{:U('link/index')}>' >外链列表</a></li>
 <li><a href='<{:U('source/index')}>' class='onlink'>网站列表</a></li>
</ul>
<div class="statistics">

</div>

</div>
</div>
<!--/top-->

<!--left-->
<div class='leftbox' id='leftbox'>
<h3 class='f14'><i></i>功能菜单</h3>
<ul id='leftbox-submenu' class='submenu'>
    <li class='onlink'><a href='<{:U('source/index')}>'>站点列表</a></li>
    <li><a href='#' onclick="add();return false;">添加网站</a></li>
</ul>
</div>
<!--/left-->

<!--right-->
<div class="sitemap" id="sitemap">
	当前位置:系统管理 &gt; <a href="<{:U('source/index')}>">站点资源列表</a>
</div>
    <div class="rightbox" id="rightbox">
        <div class="maincontent">
            <div class="mainoutside" id="tip">
                <div id="secmainoutside">
                    <div class="mainarea_shop">
                        <div class="servicesearch mt10">
                            <form method="get" action="<{:U('source/index')}>">
                            关键词:<input type="text" id="wd" name="wd" size="8"class="text"/>&nbsp;&nbsp;
                            类型:<select name="stype"><option value="-1" selected>全部</option><option value="0">论坛</option><option value="1">博客</option><option value="2">问答</option><option value="3">评论</option><option value="4">分享</option><option value="5">网盘</option><option value="6">视频</option></select>&nbsp;&nbsp;
                            日期:<input type="text" id="st" name="st" onclick="return Calendar('st');" value="" class="text" style="width:85px;"/>-<input type="text" id="et" onclick="return Calendar('et');" value="" name="et" class="text" style="width:85px;"/>
                            <button type="submit" class="butsubmit" id="btn-search">查询</button>
                            </form>
                        </div>
                    </div>

                    <!--内容-->
                    <table class="mainlist">
                        <thead>
                            <tr>
                                <td width="4%">ID</td>
                                <td width="4%">类别</td>
                                <td width="12%">名称</td>
                                <td align="left">地址</td>
                                <td width="15%">添加时间</td>
                                <td width="4%">等级</td>
                                <td width="16%">操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            <volist name="slist" id="s">
                            <tr>
                                <td align="center"><{$s.sid}></td>
                                <td align="center"><a href="<{:U('source/index?stype='.$s['stype'])}>"><?php echo $stype[$s['stype']];?></a></td>
                                <td align="center"><{$s.sname}></td>
                                <td><a href="<{$s.surl}>" target="_blank"><{$s.surl}></a></td>
                                <td align="center"><{$s.stime|date="Y-m-d H:i:s",###}></td>
                                <td align="center"><{$s.slevel}></td>
                                <td align="center"><a href="<{$s.sregurl}>" target="_blank">注册</a> <a href="<{$s.slogurl}>" target="_blank">登陆</a> <a href="<{$s.spuburl}>" target="_blank">发帖</a> <a href="#" onclick="edit(<{$s.sid}>);return false;">编辑</a> <a href="#" onclick="del(<{$s.sid}>);return false;">删除</a></td>
                            </tr>
                            </volist>
                        </tbody>
                    </table>
                    <!--分页-->
                    <div class="pages"><{$show}></div>
                </div>
            </div>
        </div>
    </div>
<!--/right-->
</body>
</html>